import Vue from 'vue';
import Router from 'vue-router';
import Mlogin from 'base/account/login/login';
import MForgetPassword from 'base/account/forgetpassword/forgetpassword';
import MRegister from 'base/account/register/register';

import { indexRouter } from './indexpage';
import { mineRouter } from './minepage';
import { gameRouter } from './gamepage';
import { shopRouter } from './shoppage';
import { entertainmentRouter } from './entertainmentpage';

Vue.use(Router);

export default new Router({
    mode: 'hash',
    routes: [
        {
            path: '/',
            redirect: '/index',
        },
        indexRouter,
        gameRouter,
        mineRouter,
        shopRouter,
        entertainmentRouter,
        {
            path: '/login',
            name: 'Mlogin',
            component: Mlogin,
            children: [
                {
                    path: 'forgetpassword',
                    name: 'MForgetPassword',
                    component: MForgetPassword,
                },
                {
                    path: 'register',
                    name: 'MRegister',
                    component: MRegister,
                },
            ],
        },
    ],
});
